
<script type="text/javascript">

$(function(){


	/*
	 * Função que traz os dados da escola
	 */
	$.ajax({
		type:"POST",
		url:"actions/escolaAction.php",
		dataType:"json",
		success: function(data, textStatus, request){
			$("#txtNome").html(data['nome']);
			$("#txtEndereco").html(data['endereco']);
			$("#txtCidade").html(data['nomeCidade']);
			$("#txtTelefone1").html(data['telefone1']);
			$("#txtDiretor").html(data['diretor']);
			$("#txtTelefone2").html(data['telefone2']);
			$("#txtCep").html(data['cep']);
			$("#txtEstado").html(data['estado']);
			$("#txtNomeReduzido").html(data['nome_reduzido']);
			$("#txtFacebook").html(data['facebook']);
			$("#txtWebPage").html(data['webpage']);
			$("#txtBairro").html(data['bairro']);
			$("#txtTwitter").html(data['twitter']);
			$("#txtEmail").html(data['email']);			
		}	
	});
	
	//carrega o componente fala professor
	$("#cpFalaProf").load("componentes/falaDiretor.php");
	
	//carrega o componente fala professor
	$("#cpCalendario").load("componentes/Calendario.php");
	

})




function abrirFalaDiretor(){
	
	$('#fala_diretor').dialog({show: "blind",
						hide: "explode",
						width:430,
						height:380,
						resizable:false}); 
}



function abrirCalendario(){
	
	$('#exibe_calendario').dialog({show: "blind",
						hide: "explode",
						width:320,
						height:340,
						resizable:false}); 
}
</script>

<div id="formularios">

    <fieldset style="height:380px;width:800px;padding:20px;">
    
        <legend>
            <img src="images/topoPaginas/Icon_Escola_Menu.png"/>
        </legend>
        
        
        <div id="btnSairForms">
            <a href="/?pg=home" title="Sair" style="border:0;">
                <img src="images/btnOutros/btnSairForms.png"/>
            </a>
        </div>
        <div style="position:relative;left:90px;"> 
               
        	<table width="720" border="0">
              <tr>
                <td width="175"><span id="title">Nome da Escola</span><br /><span id="txtNome"></span></td>
                <td width="189">&nbsp;</td>
                <td width="121">&nbsp;</td>
                <td width="247"><span id="title">Nome Reduzido</span><br /><span id="txtNomeReduzido"></span></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><span id="title">Endereço</span><br /><span id="txtEndereco"></span></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td><span id="title">Bairro</span><br /><span id="txtBairro"></span></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><span id="title">Cidade</span><br /><span id="txtCidade"></span></td>
                <td><span id="title">Estado</span><br /><span id="txtEstado"></span></td>
                <td>&nbsp;</td>
                <td><span id="title">E-mail</span><br /><span id="txtEmail"></span></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><span id="title">Telefone 1</span><br /><span id="txtTelefone1"></span></td>
                <td><span id="title">Telefone 2</span><br /><span id="txtTelefone2"></span></td>
                <td><span id="title">CEP</span><br /><span id="txtCep"></span></td>
                <td><span id="title">Web Page</span><br /><span id="txtWebPage"></span></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><span id="title">Diretor(a)</span><br /><span id="txtDiretor"></span></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td><span id="title">Twitter</span><br /><span id="txtTwitter"></span></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td><span id="title">Facebook</span><br /><span id="txtFacebook"></span></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table>
            
        </div>
    </fieldset>
    
    <div style="text-align:center;">
    	<a href="javascript:void(0);" onclick="abrirFalaDiretor();" title="Fala Professor" style="border:0;text-decoration:none;">
            <img src="images/btnOutros/btnFalaDiretor.png"/>
        </a>
        &nbsp;&nbsp;
    	<a href="javascript:void(0);" title="Calendário" onclick="abrirCalendario();" style="border:0;text-decoration:none;padding-left:12px;">
            <img src="images/btnOutros/btnCalendario.png" />
        </a>
    </div>

</div>

<!-- -----------Fala Professor Componente------------- -->
<div id="cpFalaProf" style="display:none;"></div>
<!-- -----------Fala Professor Componente------------- -->


<!-- -----------Calendario Componente------------- -->
<div id="cpCalendario" style="display:none;"></div>
<!-- -----------Calendario Componente------------- -->